# for i in range(10):
#     print(i)
# m = range(10)
# print(m,type(m))

# iter_obj = m.__iter__()
# # print(type(iter_obj))
# print(iter_obj.__next__())
# print(iter_obj.__next__())

class  Foo():
    def __init__(self):
        self.counter = 0
    
    # def __iter__(self):
    #     return self
    def __next__(self):
        self.counter += 1
        # if self.counter == 3:
        #     raise StopIteration()
        # else:
        return self.counter

v1=Foo()
data=next(v1)
print(data)
data=next(v1)
print(data)
data=next(v1)
print(data)
data=next(v1)
print(data)
data=next(v1)
print(data)

list1 = [1,2,5,6]
ran = iter(list1)
print(ran.__next__())